<?php # Connect to the MySQL Server

/* PLEASE NOTE: COMMENT OUT ALL DEBUG CODE BEFORE INTEGRATION!
 *
 * Database access info --
 * This is why this file needs to be outside /var/www/
 * Instead, this file should be stored in /var/mysql
 */
DEFINE ('DB_USER', 'UI_API');
DEFINE ('DB_PASSWORD', 'allyourbase');
DEFINE ('DB_HOST', 'localhost');
DEFINE ('DB_NAME', 'RoomNanny');

// Connect to the database
$database = @mysql_connect (DB_HOST, DB_USER, DB_PASSWORD);

if(!$database) {
    die ('We\'re sorry! There was a problem connecting to the RoomNanny database. Please try again.');
}
//echo "Connection successful.";
    
// Select the database
@mysql_select_db (DB_NAME);
    //OR die ('Problem selecting the MySQL database: ' . mysql_error() );
    // ^^^ Debug Code! ^^^
?>
